package com.bbs.crawl;

import java.sql.Connection;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;
import java.util.ArrayList;
import java.util.List;

import com.car.util.ConnectionPool;

public class ReployOfXcar {
	private Connection conn = ConnectionPool.getConnection("carvoice_core", "root", "zhouzhou100428", "192.168.1.168");

	public List<Integer> getBBSId() {
		List<Integer> list = new ArrayList<>();
		String sql = "SELECT xcar_bbsid FROM core_brand_xcar where xcar_bbsid>0";
		Statement st = null;
		ResultSet rs = null;
		try {
			st = conn.createStatement();
			rs = st.executeQuery(sql);
			while (rs.next()) {
				list.add(rs.getInt("xcar_bbsid"));
			}
		} catch (SQLException e) {
			e.printStackTrace();
		}
		return list;
	}
}
